extension MapExtension<T> on Map<dynamic, T> {
  T? getOrNull(dynamic key) {
    if (containsKey(key)) {
      return this[key];
    }
    return null;
  }

  Map? getMap(dynamic key) {
    if (containsKey(key)) {
      var res = this[key];
      if (res is Map) {
        return res;
      }
    }
    return null;
  }
}
